home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group01a.txt / 000061_icon-group-sender _Tue Jun 13 10:16:17 2000.msg < prev    next >
Internet Message Format  |  2002-01-03  |  2KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id KAA06876
  4.     for icon-group-addresses; Tue, 13 Jun 2000 10:15:19 -0700 (MST)
  5. Message-Id: <200006131715.KAA06876@baskerville.CS.Arizona.EDU>
  6. From: gep2@terabites.com
  7. Date: Tue, 13 Jun 2000 10:35:29 -0500
  8. Subject: setting environment variables
  9. To: icon-group@optima.CS.Arizona.EDU
  10. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  11. Status: RO
  12. Content-Length: 1795
  13.  
  14. > How can you set an environment variable in a dos window from an icon
  15. program ?
  16.  
  17. I'm not sure that you can.  Some time back, I recall hearing that Windows was changed to crunch out unused space in the environment area when opening DOS windows (as a way to reduce memory usage... not that that's QUITE so important anymore).
  18.  
  19. I'm curious what you intend to accomplish by setting the environment variables, though.  If you open a DOS window from an Icon program, and if you COULD set the environment variable within that DOS window, you ought to understand that that environment variable would disappear anyhow when the DOS window closes (i.e. upon return to Icon) since environment variables do NOT propagate back to higher DOS windows.  You don't therefore change the environment variables that the Icon program would see, for instance.  
  20.  
  21. If you CAN set them at all (subject to the space available, which MIGHT be zero) for use in later programs running under that SAME DOS shell) you would probably need to do that using a batch file which includes a SET statement prior to the command that runs the target program.
  22.  
  23. The workaround for the "collapsed environment area" that was usually discussed back when this "feature" of Windows came out was to create in the AUTOEXEC.BAT file one or more dummy "placeholder" environment variables which could be undefined (or defined to a null string, or at least something shorter, thus releasing the space) within your Icon program's invoked DOS shell prior to adding the new environment variable.
  24.  
  25. Gordon Peterson
  26. http://web2.airmail.net/gep2/
  27. Support the Anti-SPAM Amendment!  Join at http://www.cauce.org/
  28. 12/19/98: the day the Conservatives demonstrated their scorn for their
  29.    fraudulent sham of representative government.  Voters, remember it!
  30.  
  31.